package com.yyplatform.frontend.infra.web.jwt;

import lombok.Getter;

/**
 * Created on 2024-10-17
 */
@Getter
public class CurrentUserHolder {
    public static final String HOLDER_KEY = "_account_holder_";

    private final CurrentUser currentUser;
    private final String jwtToken;
    private final long userId;


    public CurrentUserHolder() {
        currentUser = null;
        jwtToken = "";
        userId = 0L;
    }


    public CurrentUserHolder(CurrentUser currentAccount, String jwt) {
        currentUser = currentAccount;
        jwtToken = jwt;
        userId = currentUser.getUserId();
    }


}
